<template>
  <el-card class="container">
    <el-button type="primary">添加品牌</el-button>

    <el-table :data="tableData" border>
      <el-table-column type="index" label="序号" width="50" align="center">
      </el-table-column>
      <el-table-column prop="date" label="品牌名称"> </el-table-column>
      <el-table-column prop="URL" label="品牌LOGO">
        <img :src="name" width="40" height="40" class="head_pic"
      /></el-table-column>
      <el-table-column label="操作">
        <el-button type="warning" icon="el-icon-edit">修改</el-button>
        <el-button type="danger" icon="el-icon-delete">删除</el-button>
      </el-table-column>
    </el-table>

    <el-pagination
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page="currentPage"
      :page-sizes="[3, 6, 9, 12]"
      :page-size="pageSize"
      layout="total, sizes, prev, pager, next, jumper"
      :total="total"
    >
    </el-pagination>
  </el-card>
</template>

<script>
export default {
  name: "Trademark",
  data() {
    return {
      tableData: [
        {
          date: "小米",
          name: "../../../../public/下载.jpg",
        },
        {
          date: "苹果",
          name: "王小虎",
        },
        {
          date: "魅族",
          name: "王小虎",
        },
        {
          date: "华为",
          name: "王小虎",
        }
      ],
      currentPage: 1,
      pageSize: 3,
      total: 100
    };
  },
  methods: {
    handleSizeChange(val) {
      console.log(`每页 ${val} 条`);
    },
    handleCurrentChange(val) {
      console.log(`当前页: ${val}`);
    }
  }
};
</script>

<style lang="scss" scoped>
.container {
  margin: 10px;
}
</style>
